module.exports = function (runtime, global) {
    importClass(java.lang.Integer);
    importClass(net.yrom.screenrecorder.ScreenRecordActivity);
    importClass(net.yrom.screenrecorder.core.RecordConfig);
    var context = global.context;
    var screen = {};
    screen.record = ScreenRecordActivity

    screen.start = function (rtmpUrl, width, height, bitrate, dpi) {
        var recordConfig = new RecordConfig(rtmpUrl,width,height,bitrate,dpi)
        ScreenRecordActivity.start(context,recordConfig)
    }

    screen.stop = function () {
        ScreenRecordActivity.stop()
    }

    return screen;

}
